In recent years, flash memory has been frequently used as a nonvolatile semiconductor memory device. A multivalued processing technique is used as a technique for achieving large-capacity flash memory. Japanese Unexamined Patent Application Publication No. 2001-101879 discloses a technique of storing multi-value data in a memory cell by setting multiple threshold voltages in the memory cell.